from peewee import *;

db = SqliteDatabase('mostone.db')

class BaseModel(Model):
    class Meta:
        database = db

class MostOneAppItem(BaseModel):
    """应用信息"""
    id = IntegerField(primary_key=True)
    appname = TextField()
    git_url = TextField(null=True)
    reposity = TextField(null=True)
    bundle_id = TextField()
    release_bundle_id = TextField(null=True)
    test = TextField()


class PackageConfig(BaseModel):
    """打包配置"""
    
    #打包配置
    id: int = IntegerField(primary_key=True)
    project_path: str = TextField()
    project_name: str = TextField()
    workspace_name: str = TextField()
    configuration: str = TextField()
    env_config_path: str = TextField()
    schema: str = TextField(null=True, default=project_name)
    speedpackage: bool = BooleanField(default=True)
    app_info_id: int = IntegerField(null=True)
    branch: str = TextField(null=True)
    
    #分发配置
    ipa_path: str = TextField(null=True)
    ipa_url: str = TextField(null=True)
    full_image_url: str = TextField(null=True)
    version: str = TextField(null=True)
    title: str = TextField(null=True)
    
if __name__ == "__main__":


    pass